#!/sbin/openrc-run

_port=8080
_bind=0.0.0.0
_basedir=/usr/share/webapps/netbox
_logfile="/var/log/${RC_SVCNAME}"
pidfile="/run/netbox/${RC_SVCNAME}.pid"
command=/usr/bin/gunicorn
command_args="--daemon \
	--pid $pidfile \
	--log-file $_logfile \
	--log-level info \
	-c $_basedir/gunicorn_config.py netbox.wsgi"
command_user="netbox"
command_group="netbox"

start_pre() {
	checkpath --directory /run/${RC_SVCNAME} /var/log/${RC_SVCNAME} \
		--owner $command_user:$command_group --mode 755
}

